# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
require_dependency File.expand_path(File.dirname(__FILE__) + '/../../vendor/plugins/sourdough/app/controllers/application')

class ApplicationController < ActionController::Base

  include AuthenticatedSystem
  include ExceptionNotifiable

  # Pick a unique cookie name to distinguish our session data from others'
  session :session_key => '_pronetos_session_id', :secret => 'JeiCh7cu iNgeef4a ahPh0mi6 AhW9ahch ie8dahD7 paMuch0a OhJ8aizo ahCoom2d'

  protected

  def find_user
    @user = User.find_by_login(params[:profile_id])
  end

  def find_discipline
    @discipline = Discipline.find(params[:discipline_id])
    @college = @discipline.college
  end

end
